package com.docted.design.pattern.singleton.lazy;

/**
 * @author DoCted
 * @since v1.0 2018/3/7
 */
public class LazyOne {
    /**
     * 默认在加载时候不实例化
     * 在去显式获取实例的时候才去实例化
     * 延时加载
     */


    private LazyOne() {

    }

    private static LazyOne lazyOne = null;


    public static LazyOne getInstance() {
        if (lazyOne == null) {
            lazyOne = new LazyOne();
        }
        return lazyOne;
    }

}
